home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / msfs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  16.6 KB  |  393 lines

  1. #ifndef _MSFS_H
  2. #define _MSFS_H
  3. #pragma option push -b
  4.  
  5.  
  6. /*
  7.  *  M S F S . H
  8.  *
  9.  *
  10.  *  Copyright (C) Microsoft Corp. 1986-1996.  All Rights Reserved.
  11.  *
  12.  *
  13.  *  Definitions used by the the Microsoft Mail transport, address book
  14.  *  and shared folder service providers.
  15.  *
  16.  *  The following MSFS defined properties are configurable via ConfigureMsgService()
  17.  *  calls.  They are grouped by function.
  18.  *
  19.  *  C o n n e c t i o n   P r o p e r t i e s
  20.  *
  21.  *  PR_CFG_SERVER_PATH
  22.  *      --  The path to the users post office.  Mapped network drives, UNC and NETWARE paths
  23.  *          are acceptable.  NETWARE paths of the type NWServer/share:dir\dir1 are converted to 
  24.  *          UNC paths of the type \\NWServer\share\dir\dir1. 
  25.  *
  26.  *  PR_CFG_MAILBOX
  27.  *      --  The users mailbox name.  eg. in a NET/PO/USER address,
  28.  *          this is USER.  The maximum mailbox name is 10 characters.
  29.  *
  30.  *  PR_CFG_PASSWORD
  31.  *      --  The users mailbox password.  The maximum password is 8 characters.
  32.  *
  33.  *  PR_CFG_REMEMBER
  34.  *      --  A boolean value indicating whether the users password is
  35.  *          to be remembered in the profile or not.  This is useful because
  36.  *          if the password is remembered the user can bypass the logon prompt
  37.  *          if his server path, mailbox name and password are all supplied.
  38.  *
  39.  *  PR_CFG_CONN_TYPE
  40.  *      --  The connection type.  This may be one of CFG_CONN_AUTO, CFG_CONN_LAN,
  41.  *          CFG_CONN_REMOTE, CFG_CONN_OFFLINE as defined below.
  42.  *
  43.  *          CFG_CONN_AUTO       --  Automatically detect whether the connection type is LAN or REMOTE.
  44.  *                                  This connection type is only available on Win95.
  45.  *          CFG_CONN_LAN        --  LAN type connection.  Used to connect to the post office using a
  46.  *                                  UNC path or pre-existing mapped drive.
  47.  *          CFG_CONN_REMOTE     --  Dial up connection using Dial-up Networking.
  48.  *          CFG_CONN_OFFLINE    --  Not connected.
  49.  *
  50.  *  PR_CFG_SESSION_LOG
  51.  *      --  A boolean value indicating whether session logging
  52.  *          is on or off.
  53.  *
  54.  *  PR_CFG_SESSION_LOG_FILE
  55.  *      --  The path to the session log file.
  56.  *
  57.  *  D e l i v e r y   P r o p e r t i e s
  58.  *
  59.  *  PR_CFG_ENABLE_UPLOAD
  60.  *      --  A boolean value which indicates whether mail in the outbox
  61.  *          is sent.
  62.  *
  63.  *  PR_CFG_ENABLE_DOWNLOAD
  64.  *      --  A boolean value which indicates whether mail in the server
  65.  *          mailbag is downloaded.
  66.  *
  67.  *  PR_CFG_UPLOADTO
  68.  *      --  A bit array which allows the user to indicate which addresses
  69.  *          for which the transport is to attempt delivery.  This is useful
  70.  *          in order to allow a user to specify that a transport only handle
  71.  *          delivery for a subset of the addresses it can really process.
  72.  *          When multiple transports are installed and the user wants a
  73.  *          different transport to handle some specific address types they
  74.  *          can use this bit array to specify that the MSMAIL transport
  75.  *          only handle a specific set of addresses.
  76.  *
  77.  *          Possible values as defined below include:
  78.  *
  79.  *          CFG_UPLOADTO_PCMAIL     --  Local Post Office and External Post Office address types
  80.  *          CFG_UPLOADTO_PROFS      --  PROFS address types
  81.  *          CFG_UPLOADTO_SNADS      --  SNADS address types
  82.  *          CFG_UPLOADTO_OV         --  OfficeVision address types
  83.  *          CFG_UPLOADTO_MCI        --  MCI address types
  84.  *          CFG_UPLOADTO_X400       --  X.400 address types
  85.  *          CFG_UPLOADTO_FAX        --  FAX address types
  86.  *          CFG_UPLOADTO_MHS        --  MHS address types
  87.  *          CFG_UPLOADTO_SMTP       --  SMTP address types
  88.  *          CFG_UPLOADTO_MACMAIL    --  MacMail address types
  89.  *          CFG_UPLOADTO_ALL        --  All of the above address types
  90.  *
  91.  *
  92.  *  PR_CFG_NETBIOS_NTFY
  93.  *      --  A boolean value which indicates whether a netbios notification
  94.  *          is sent to a recipients transport when mail is delivered to
  95.  *          their server inbox.
  96.  *
  97.  *  PR_CFG_SPOOLER_POLL
  98.  *      --  The polling interval in minutes when the transport
  99.  *          checks for new mail.  1 <= polling interval <= 9999
  100.  *
  101.  *  PR_CFG_GAL_ONLY
  102.  *      --  A boolean value which, if TRUE, only displays the Microsoft Mail Global Address
  103.  *          list for name selection.  The Postoffice list, external post office lists, and gateway
  104.  *          address lists are not shown.
  105.  *
  106.  *  F a s t  L A N  P r o p e r t i e s
  107.  *
  108.  *  PR_CFG_LAN_HEADERS
  109.  *      --  A boolean value which indicates whether the user wants to enable
  110.  *          headers while working on the LAN.  Headers mode allows the user
  111.  *          to download message headers and selectively choose which mail
  112.  *          to download.
  113.  *
  114.  *  PR_CFG_LAN_LOCAL_AB
  115.  *      --  A boolean value which indicates whether the user wants to use
  116.  *          name resolution based on a local copy of the server address book
  117.  *          rather than the server address book itself.
  118.  *
  119.  *  PR_CFG_LAN_EXTERNAL_DELIVERY
  120.  *      --  A boolean value which indicates whether EXTERNAL.EXE, a server process, should be used
  121.  *          to deliver submitted mail messages.  This is sometimes useful when mail is running 
  122.  *          on a slow LAN connection.
  123.  *
  124.  *  S l o w  L A N  P r o p e r t i e s
  125.  *
  126.  *  PR_CFG_RAS_HEADERS
  127.  *      --  A boolean value which indicates whether the user wants to enable
  128.  *          headers while working over a slow speed link.  Headers mode
  129.  *          allows the user to download message headers and selectively
  130.  *          choose which mail to download.
  131.  *
  132.  *  PR_CFG_RAS_LOCAL_AB
  133.  *      --  A boolean value which indicates whether the user wants to use
  134.  *          name resolution based on a local copy of the server address book
  135.  *          rather than the server address book itself.
  136.  *
  137.  *  PR_CFG_RAS_EXTERNAL_DELIVERY
  138.  *      --  A boolean value which indicates whether EXTERNAL.EXE, a server process, should be used
  139.  *          to deliver submitted mail messages.  This speeds up message delivery when mail is
  140.  *          running on a Dial-up network connection.
  141.  *
  142.  *  PR_CFG_RAS_INIT_ON_START
  143.  *      --  A boolean value which indicates that a Dial-up Network connection should
  144.  *          be established when the transport provider starts up.
  145.  *
  146.  *  PR_CFG_RAS_TERM_ON_HDRS
  147.  *      --  A boolean value which indicates that a Dial-up Network connection should
  148.  *          be automatically terminated when headers are finished downloading.
  149.  *
  150.  *  PR_CFG_RAS_TERM_ON_XFER
  151.  *      --  A boolean value which indicates that a Dial-up Network connection should
  152.  *          be automatically terminated after mail has finished being sent
  153.  *          received.
  154.  *
  155.  *  PR_CFG_RAS_TERM_ON_EXIT
  156.  *      --  A boolean value which indicates that a Dial-up Network connection should
  157.  *          be automatically terminated when the provider is exited.
  158.  *
  159.  *  PR_CFG_RAS_PROFILE
  160.  *      --  The name of the Dial-up Network profile that the transport will use by
  161.  *          default to attempt the connection.
  162.  *
  163.  *  PR_CFG_RAS_RETRYATTEMPTS
  164.  *      --  Number of times to attempt dial for connection.
  165.  *          1 <= retry attempts <= 9999
  166.  *
  167.  *  PR_CFG_RAS_RETRYDELAY
  168.  *      --  Delay between retry attempts in seconds.
  169.  *          30 <= retry delay <= 9999
  170.  *
  171.  *  PR_CFG_RAS_CONFIRM
  172.  *      --  A value which determines whether, at connection time, the
  173.  *          user should be prompted to select a Dial-up Network connection.
  174.  *          Possible values as defined below include:
  175.  *          CFG_ALWAYS      --  Always use the default Dial-up Network profile.
  176.  *                              Never prompt the user.
  177.  *          CFG_ASK_FIRST   --  Prompt the user to select a profile on the
  178.  *                              first connection or after any error occurs.
  179.  *          CFG_ASK_EVERY   --  Always prompt the user to select the 
  180.  *                              Dial-up Network profile.
  181.  *
  182.  *  S c h e d u l e d   S e s s i o n   P r o p e r t i e s 
  183.  *
  184.  *  PR_CFG_SCHED_SESS
  185.  *      --  A property that contains information on scheduled sessions.  The
  186.  *          maximum number of entries that may be stored is CFG_SS_MAX.  The
  187.  *          information is stored in the data structure SchedSess.
  188.  *
  189.  *          typedef struct SchedSess {
  190.  *              USHORT          sSessType;
  191.  *              USHORT          sDayMask;
  192.  *              FILETIME        ftTime;
  193.  *              FILETIME        ftStart;
  194.  *              ULONG           ulFlags;
  195.  *              TCHAR           szPhoneEntry[RAS_MaxEntryName+1];
  196.  *          } SCHEDSESS, FAR *LPSCHEDSESS;
  197.  *      
  198.  *          SchedSess.sSessType can be one of CFG_SS_ONCE, CFG_SS_WEEKLY, or  CFG_SS_EVERY.
  199.  *         
  200.  *              CFG_SS_ONCE     is a session that is scheduled to execute only once on a specific
  201.  *                              date and time.
  202.  *
  203.  *              CFG_SS_WEEKLY   is a session that is scheduled to execute at a specific time on any
  204.  *                              of a given specified set of days during the week.
  205.  *      
  206.  *              CFG_SS_EVERY    is a session that is scheduled to execute at regularly scheduled 
  207.  *                              intervals of time.
  208.  *
  209.  *          SchedSess.sDayMask is only used when SchedSess.sSessType is set to CFG_SS_WEEKLY.  
  210.  *          SchedSess.sDayMask can be any combination of CFG_SS_SUN, CFG_SS_MON, CFG_SS_TUE, 
  211.  *          CFG_SS_WED, CFG_SS_THU, CFG_SS_FRI, or CFG_SS_SAT.
  212.  *
  213.  *          SchedSess.ftTime varies depending on the SchedSess.sSessType as follows:
  214.  *          
  215.  *                  SchedSess.sSessType             SchedSess.ftTime
  216.  *          
  217.  *                  CFG_SS_ONCE                     Date/time for the single scheduled session
  218.  *                  CFG_SS_WEEKLY                   Time for any weekly scheduled sessions
  219.  *                  CFG_SS_EVERY                    Duration between re-occuring scheduled sessions
  220.  *
  221.  *          SchedSess.ftStart is only used as the initial start time for sessions of type CFG_SS_EVERY.
  222.  *
  223.  *          SchedSess.ulFlags is currently unused and is reserved for future use.
  224.  *
  225.  *          SchedSess.szPhoneEntry is the name of the Dial-up Networking connection to use
  226.  *          when the session is scheduled to execute.  The Dial-up Network connection contains
  227.  *          the phone number and other relevent information needed to perform the connection.
  228.  *
  229.  *          Note:   All FILETIME structure members should always use local time.  ie. GetLocalTime()
  230.  *                  returns a SYSTEMTIME structure which can then be converted to FILETIME via 
  231.  *                  SystemTimetoFileTime().
  232.  */
  233.  
  234.  
  235. #include <ras.h>
  236.  
  237.  
  238. #include <mapitags.h>
  239.  
  240.  
  241. #if defined (__BORLANDC__)
  242. #  include <pshpack8.h>
  243. #endif
  244.  
  245. /*
  246.  * Connection Properties
  247.  */
  248. #define PR_CFG_SERVER_PATH              PROP_TAG (PT_STRING8,   0x6600)
  249. #define PR_CFG_MAILBOX                  PROP_TAG (PT_STRING8,   0x6601)
  250. // Password must be in the secure property range (See MAPITAGS.H)
  251. #define PR_CFG_PASSWORD                 PROP_TAG (PT_STRING8,   PROP_ID_SECURE_MIN)
  252. #define PR_CFG_CONN_TYPE                PROP_TAG (PT_LONG,      0x6603)
  253. #define     CFG_CONN_LAN            0
  254. #define     CFG_CONN_REMOTE         1
  255. #define     CFG_CONN_OFFLINE        2
  256. #define     CFG_CONN_AUTO           3
  257. #define PR_CFG_SESSION_LOG              PROP_TAG (PT_BOOLEAN,   0x6604)
  258. #define PR_CFG_SESSION_LOG_FILE         PROP_TAG (PT_STRING8,   0x6605)
  259. #define PR_CFG_REMEMBER                 PROP_TAG (PT_BOOLEAN,   0x6606)
  260.  
  261. /*
  262.  * Delivery Properties
  263.  */
  264.  
  265. #define PR_CFG_ENABLE_UPLOAD            PROP_TAG (PT_BOOLEAN,   0x6620)
  266. #define PR_CFG_ENABLE_DOWNLOAD          PROP_TAG (PT_BOOLEAN,   0x6621)
  267. #define PR_CFG_UPLOADTO                 PROP_TAG (PT_LONG,      0x6622)
  268. #define     CFG_UPLOADTO_PCMAIL     0x00000001
  269. #define     CFG_UPLOADTO_PROFS      0x00000002
  270. #define     CFG_UPLOADTO_SNADS      0x00000004
  271. #define     CFG_UPLOADTO_MCI        0x00000008
  272. #define     CFG_UPLOADTO_X400       0x00000010
  273. #define     CFG_UPLOADTO_FAX        0x00000040
  274. #define     CFG_UPLOADTO_MHS        0x00000080
  275. #define     CFG_UPLOADTO_SMTP       0x00000100
  276. #define     CFG_UPLOADTO_OV         0x00000800
  277. #define     CFG_UPLOADTO_MACMAIL    0x00001000
  278. #define     CFG_UPLOADTO_ALL        CFG_UPLOADTO_PCMAIL | CFG_UPLOADTO_PROFS | CFG_UPLOADTO_SNADS | \
  279.                                     CFG_UPLOADTO_MCI | CFG_UPLOADTO_X400 | CFG_UPLOADTO_FAX | \
  280.                                     CFG_UPLOADTO_MHS | CFG_UPLOADTO_SMTP | CFG_UPLOADTO_OV | \
  281.                                     CFG_UPLOADTO_MACMAIL
  282. #define PR_CFG_NETBIOS_NTFY             PROP_TAG (PT_BOOLEAN,   0x6623)
  283. #define PR_CFG_SPOOLER_POLL             PROP_TAG (PT_STRING8,   0x6624)
  284. #define PR_CFG_GAL_ONLY             PROP_TAG (PT_BOOLEAN,       0x6625)
  285.  
  286. /*
  287.  * LAN Properties
  288.  */
  289.  
  290. #define PR_CFG_LAN_HEADERS              PROP_TAG (PT_BOOLEAN,   0x6630)
  291. #define PR_CFG_LAN_LOCAL_AB             PROP_TAG (PT_BOOLEAN,   0x6631)
  292. #define PR_CFG_LAN_EXTERNAL_DELIVERY    PROP_TAG (PT_BOOLEAN,   0x6632)
  293.  
  294. /*
  295.  * Dial-up Network Properties
  296.  */
  297.  
  298. #define PR_CFG_RAS_EXTERNAL_DELIVERY    PROP_TAG (PT_BOOLEAN,   0x6639)
  299. #define PR_CFG_RAS_HEADERS              PROP_TAG (PT_BOOLEAN,   0x6640)
  300. #define PR_CFG_RAS_LOCAL_AB             PROP_TAG (PT_BOOLEAN,   0x6641)
  301. #define PR_CFG_RAS_INIT_ON_START        PROP_TAG (PT_BOOLEAN,   0x6642)
  302. #define PR_CFG_RAS_TERM_ON_HDRS         PROP_TAG (PT_BOOLEAN,   0x6643)
  303. #define PR_CFG_RAS_TERM_ON_XFER         PROP_TAG (PT_BOOLEAN,   0x6644)
  304. #define PR_CFG_RAS_TERM_ON_EXIT         PROP_TAG (PT_BOOLEAN,   0x6645)
  305. #define PR_CFG_RAS_PROFILE              PROP_TAG (PT_STRING8,   0x6646)
  306. #define PR_CFG_RAS_CONFIRM              PROP_TAG (PT_LONG,      0x6647)
  307. #define     CFG_ALWAYS              0
  308. #define     CFG_ASK_FIRST           1
  309. #define     CFG_ASK_EVERY           2
  310. #define PR_CFG_RAS_RETRYATTEMPTS        PROP_TAG (PT_STRING8,   0x6648)
  311. #define PR_CFG_RAS_RETRYDELAY           PROP_TAG (PT_STRING8,   0x6649)
  312.  
  313.  
  314. /*
  315.  * Message Header Property
  316.  */
  317.  
  318. #define PR_CFG_LOCAL_HEADER             PROP_TAG (PT_BOOLEAN,   0x6680)
  319.  
  320. /*
  321.  * Scheduled Session Properties
  322.  */
  323. #define     CFG_SS_MAX          16
  324. #define     CFG_SS_BASE_ID      0x6700
  325. #define     CFG_SS_MAX_ID       CFG_SS_BASE_ID + CFG_SS_MAX - 1
  326. #define SchedPropTag(n)         PROP_TAG (PT_BINARY, CFG_SS_BASE_ID+(n))
  327. #define PR_CFG_SCHED_SESS       SchedPropTag(0)
  328.  
  329. typedef struct SchedSess {
  330.     USHORT          sSessType;
  331.     USHORT          sDayMask;
  332.     FILETIME        ftTime;
  333.     FILETIME        ftStart;
  334.     ULONG           ulFlags;
  335.     TCHAR           szPhoneEntry[RAS_MaxEntryName+1];
  336. } SCHEDSESS, FAR *LPSCHEDSESS;
  337.  
  338. // Day bits
  339. #define     CFG_SS_SUN  0x0001
  340. #define     CFG_SS_MON  0x0002
  341. #define     CFG_SS_TUE  0x0004
  342. #define     CFG_SS_WED  0x0008
  343. #define     CFG_SS_THU  0x0010
  344. #define     CFG_SS_FRI  0x0020
  345. #define     CFG_SS_SAT  0x0040
  346.  
  347. #define IsDayChecked(sDayMask, nDay)  ( (sDayMask) & (1<<(nDay)) )
  348.  
  349. // Session types
  350. #define     CFG_SS_EVERY    0
  351. #define     CFG_SS_WEEKLY   1
  352. #define     CFG_SS_ONCE     2
  353. #define     CFG_SS_NULLTYPE 3
  354.  
  355. // Property range identifiers; useful for asserting
  356. #define PR_CFG_MIN              PROP_TAG (PT_STRING8,   0x6600)
  357. #define PR_CFG_MAX              SchedPropTag(CFG_SS_MAX-1)
  358.  
  359. // Shared Folder Service Provider Properties
  360.  
  361. // PR_ASSIGNED_ACCESS - MAPI Access rights given to users other than the owner of the folder
  362. //                      This property can be retrieved and set. The following MAPI access flags
  363. //                      are valid: 
  364. //                          MAPI_ACCESS_READ
  365. //                          (MAPI_ACCESS_CREATE_HIERARCHY | MAPI_ACCESS_CREATE_CONTENTS)
  366. //                          MAPI_ACCESS_DELETE
  367. //  
  368. #define PR_ASSIGNED_ACCESS  PROP_TAG(PT_LONG, 0x66ff)
  369.  
  370. // PR_OWNER_NAME      - Owner's name of the shared folder.
  371. //                      This property can be retrieved and cannot be set.
  372. //  
  373. #define PR_OWNER_NAME       PROP_TAG(PT_STRING8, 0x66fe)
  374.  
  375. // SFSP_ACCESS_OWNER -  This flag is returned when PR_ASSIGNED_ACCESS is retrieved by the owner
  376. //                      of the folder. It can not be set.
  377. #define SFSP_ACCESS_OWNER   0x8000
  378.  
  379.  
  380. // Unique Provider Identifiers
  381. //
  382. #define MSFS_UID_ABPROVIDER     { 0x00,0x60,0x94,0x64,0x60,0x41,0xb8,0x01, \
  383.                                   0x08,0x00,0x2b,0x2b,0x8a,0x29,0x00,0x00 }
  384.  
  385. #define MSFS_UID_SFPROVIDER     { 0x00,0xff,0xb8,0x64,0x60,0x41,0xb8,0x01, \
  386.                                   0x08,0x00,0x2b,0x2b,0x8a,0x29,0x00,0x00 }
  387. #if defined (__BORLANDC__)
  388. #  include <poppack.h>
  389. #endif
  390.  
  391. #pragma option pop
  392. #endif // _MSFS_H
  393.